function l(t, n, i) {
  if (n) {
    i === null && (i = n.length);
    for (let c = i - 1; c >= 0; --c) {
      let e = n[c];
      switch (e.type) {
        case 'space':
        case 'comment':
        case 'newline':
          t -= e.source.length;
          continue;
      }
      for (e = n[++c]; (e == null ? void 0 : e.type) === 'space'; )
        (t += e.source.length), (e = n[++c]);
      break;
    }
  }
  return t;
}
export { l as emptyScalarPosition };
